import Vue from "vue";
import VueRws from "vue-rws";
import { socketUrl, isDev } from "@/config/env";

import store from "@/store";
const options = {
	// WebSocket: WS, // custom WebSocket constructor
	connectionTimeout: 300,
	maxRetries: 100
};
Vue.use(new VueRws({
	// debug: isDev,
	connection: socketUrl,
	options,
	vuex: {
		store,
		actionPrefix: "SOCKET_",
		mutationPrefix: "SOCKET_"
	}
}));
